<!DOCTYPE html>
<html lang="zh-CN"  ng-app>
<head>
<meta charset="utf-8" />
<meta http-equiv="Cache-Control" content="max-age=7200" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="HandheldFriendly" content="True" />
<meta name="MobileOptimized" content="320" />
    <title>商户账单列表</title>
    <link href="../statics/css/bootstrap.min.css" rel="stylesheet">
    <link href="../statics/css/base.css" rel="stylesheet">
	<link href="../statics/css/docs.min.css" rel="stylesheet">
	<link href="../statics/css/font-awesome.min.css" rel="stylesheet">
    <style type="text/css">
        h1,h2,h3,h4,h5{font-weight: bold;}
        .apiitem{margin:10px 0px;}
        .resultbox *{font-size:12px;}
    </style>
</head>
<body class="container" ng-controller="APIManageCtrl">
<header class="header">
    <div class="row-fluid" >
        <div class="" style="position:relative;">
            <a class="logo" href="/">奶瓶快跑接口管理工具</span></a>
			<div style="float:right;margin:10px;">
				<a href="../index.html">展示界面</a>
			</div>
			<div style="float:right;margin:10px;">
				<a href="javascript:void(0);" ng-click="logout()">登出</a>
			</div>
        </div>
        
        <br style="clear:both;" />
    </div>
</header>
<main class="row-fluid" style="margin-top:30px;">
	<div class="panel panel-default">
	  <div class="panel-heading">账单列表</div>
	  <div class="panel-body">
	  	<table class="table table-bordered">
			  <thead>
			  	<tr>
			  		<th>账单ID</th>
			  		<th>账单编号</th>
			  		<th>往期帐单编号</th>
			  		<th>订单编号</th>
			  		<th>订单应付金额</th>
			  		<th>支付方式</th>
			  		<th>产品标题</th>
			  		<th>消费码</th>
			  		<th>消费时间</th>
			  	</tr>
			  </thead>
			  <tbody>
			  	<tr ng-repeat="param in list" style="{{param.old_bill_no?'color:#20B2AA':'color:#FF0000'}}">
			  		<td>
			  			{{param.merchant_bill_id}}
			  		</td>
			  		<td>
			  			{{param.merchant_bill_no}}
			  		</td>
			  		<td>
			  			{{param.old_bill_no}}
			  		</td>
			  		<td>
			  			{{param.order_no}}
			  		</td>
			  		<td>
			  			{{param.order_amount|number:2}}
			  		</td>
			  		<td>
			  			{{param.order_pay_platform}}
			  		</td>
			  		<td>
			  			{{param.merchant_production_title}}
			  		</td>
			  		<td>
			  			{{param.merchant_ticket_no}}
			  		</td>
			  		<td>
			  			{{param.merchant_ticket_used_time}}
			  		</td>
			  	</tr>
			  </tbody>
			</table>
	  </div>
	</div>
</main> 
<script src="../statics/js/jquery.min.js"></script>
<script src="../statics/js/jquery.json.js"></script>
<script src="../statics/js/bootstrap.min.js"></script>
<script src="../statics/js/angular.min.js"></script>
<script src="../statics/js/lib.js"></script>
<script src="../statics/js/apis.js"></script>
	<script>
		Array.prototype.remove=function(dx) 
		{ 
		    if(isNaN(dx)||dx>this.length){return false;} 
		    for(var i=0,n=0;i<this.length;i++) 
		    { 
		        if(this[i]!=this[dx]) 
		        { 
		            this[n++]=this[i] 
		        } 
		    } 
		    this.length-=1 
		} 
		function APIManageCtrl($scope,$http) {
			$scope.fetchlist=function(){
				$http({
	                method  : 'GET',
	                url     : '/api/saas/v3/bill/billDetails?userId=564da134dacfcb71e052f8d3&billId=5652da04d604770ab4a153cb'
	            }).success(function(data){
	            	console.log(data.result);
	            	$scope.list=data.result;
	            })
			}
			$scope.logout=function(){
				console.log($scope.newinterface);
				$http({
	                method  : 'POST',
	                url     : '/apis/manager/logout'
	            }).success(function(data){
	            	location.href = data.result;
	            })
			}
			function init(){
				$scope.fetchlist();
			}
			init();
		}
	</script>
</body>
</html>